package com.example.tests;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;

import org.testng.annotations.Test;

import com.example.fw.GroupObject;
import com.example.fw.Groups;

public class GroupRemovalTests extends TestBase {
	
	@Test
	public void testFirstGroupCanBeRemoved() throws Exception {
		Groups oldList = app.getGroupHelper().getGroups();
		GroupObject oldGroup = oldList.getSomeGroup();
		app.getGroupHelper().deleteGroup(oldGroup);
		Groups newList = app.getGroupHelper().getGroups();
		assertThat(newList, equalTo(oldList.without(oldGroup)));
	}
}